/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.srcptit.trainning.hanhpt.btvn1;

import java.util.Scanner;

/**
 *
 * @author Administrator
 */
public class Bai6M1
{
    
    static boolean thuannghic(long n)
    {
        long dao=0;
        long a=n;
        while(n>0)
        {
            dao=dao*10+n%10;
            n=n/10;
        }
        if(dao==a)
            return true;
            return false;
    }
    public static void main(String[] args) 
    {       
        Scanner sc=new Scanner(System.in);
                System.out.println("cac so co 6 chu so la so thuan nghic la ");
                for(int i=100000;i<=999999;i++)
                    if(thuannghic(i))
                System.out.print(+ i + " ");            
    }
}
